Skip to content

PHO-8: Add platform-neutral color model and adapters#17

Merged
wow-miley merged 2 commits intomainfrom
email/pho-8-phosphor-introduce-platform-neutral-color-model-with-ansi
Mar 5, 2026
Merged

PHO-8: Add platform-neutral color model and adapters#17
wow-miley merged 2 commits intomainfrom
email/pho-8-phosphor-introduce-platform-neutral-color-model-with-ansi

Conversation

@wow-miley
Copy link
Contributor

Introduces a platform-neutral color stack in phosphor-core with NeutralColor, ColorRamp, PlatformColorAdapter, CognitiveColorModel, and an AnsiColorAdapter that supports ANSI256 and true-color output. Rewires existing ANSI-first paths (CognitiveColorRamp, Agent/Flow/Particle/Substrate/Terminal renderers) to source semantics through the new model while preserving current ANSI output, and deprecates direct ANSI constants with replacement guidance. Adds ComposeColorAdapter and updates ComposeRenderer to adapt ANSI indices through neutral colors so Compose consumers can use the same semantic palette source. Adds comprehensive tests for color parsing/interpolation, ANSI mapping fidelity, semantic model coverage, and Compose/ANSI consistency, and runs ./gradlew ktlintFormat and ./gradlew jvmTest.

@wow-miley wow-miley merged commit 93933ec into main Mar 5, 2026
1 check passed
@wow-miley wow-miley deleted the email/pho-8-phosphor-introduce-platform-neutral-color-model-with-ansi branch March 5, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant